﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using LinQ_DTO;
namespace BUS
{
    public class CauHinhBUS
    {
        public List<shop_cauhinh> LayTatCaCauHinh()
        {
            CauHinhDAO chDAO = new CauHinhDAO();
            return chDAO.LayTatCaCauHinh();
        }

        public List<shop_cauhinh> LayCauHinhTheoID(int ID)
        {
            CauHinhDAO chDAO = new CauHinhDAO();
            return chDAO.LayCauHinhTheoID(ID);
        }

        public void ThemCauHinh(shop_cauhinh CauHinh)
        {
            CauHinhDAO chDAO = new CauHinhDAO();
            chDAO.ThemCauHinh(CauHinh);
        }

        public void XoaCauHinhTheoID(int ID)
        {
            CauHinhDAO chDAO = new CauHinhDAO();
            chDAO.XoaCauHinhTheoID(ID);
        }

        public void CapNhatGiaTriCauHinh(int ID, string GiaTri)
        {
            CauHinhDAO chDAO = new CauHinhDAO();
            chDAO.CapNhatGiaTriCauHinh(ID, GiaTri);
        }

//////////////////////////////////CODE BY NMCUONG///////////////////////////
  
        public List<decimal> LayDSGiaTriKhuyenMai()
        {
            CauHinhDAO CHDao = new CauHinhDAO();
            return CHDao.LayDSGiaTriKhuyenMai();
        }

        public List<int> LayDSDieuKienKhuyenMai()
        {
            CauHinhDAO CHDao = new CauHinhDAO();
            return CHDao.LayDSDieuKienKhuyenMai();
        }

        public int LayDiemCongTichLuyBauChon()
        {
            CauHinhDAO CHDao = new CauHinhDAO();
            return CHDao.LayDiemCongTichLuyBauChon();
        }

        public int LayDiemCongTichLuyNhanXet()
        {
            CauHinhDAO CHDao = new CauHinhDAO();
            return CHDao.LayDiemCongTichLuyNhanXet();
        }
        public int LayDiemCongTichLuyMuaHang()
        {
            CauHinhDAO CHDao = new CauHinhDAO();
            return CHDao.LayDiemCongTichLuyMuaHang();

        }
    }
}
